#ifndef JLIB_GRAPHICS_MANAGERS_MODELMANAGER_H
#define JLIB_GRAPHICS_MANAGERS_MODELMANAGER_H

#include "../model/model.h"
#include "../../helper.h"
#include <unordered_map>

namespace jlib {


struct ModelManager : public Object {

  inline bool init () noexcept { return true; }

  Model *get (const std::string &path, FileDomain domain = FileDomain::Resource) noexcept;

  void clear () noexcept;

private:
  std::unordered_map<std::string, Objptr<Model> > _cache;

}; // struct ModelManager


} // namespace jlib

#endif // JLIB_GRAPHICS_MANAGERS_MODELMANAGER_H
